home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
wp
/
dana104.zip
/
WINDOW.DAS
< prev
next >
Wrap
Text File
|
1995-10-05
|
872b
|
35 lines
'---------------------------
' Windows API Using sample
'---------------------------
Const SW_SHOWNORMAL = 1
Const SW_SHOWMINIMIZED = 2
Const SW_SHOWMAXIMIZED = 3
Declare Proc ShowWindow Lib "User32" (hWnd, nCmdShow) As Integer
Declare Proc GetWindowRect Lib "User32" (hWnd%, lpRect%)
Main ()
Dim hMenu%
Dim rct$
Dim Rect(4)
hMenu = NewMenu()
AddMenuItem(hMenu, "&Normal", SW_SHOWNORMAL);
AddMenuItem(hMenu, "&Iconic", SW_SHOWMINIMIZED);
AddMenuItem(hMenu, "&Maximized", SW_SHOWMAXIMIZED);
Dim nRC
nRC = DoMenu(hMenu)
If nRC Then
ShowWindow(.hMainWnd, nRC)
End If
DiscardMenu(hMenu)
GetWindowRect(.hMainWnd, Rect)
rct$ = "Left & Top is " + Str$(Rect(1)) + "," + Str$(Rect(2))
rct$ = rct$ + Chr$(13) + Chr$(10)
rct$ = rct$ + "Right bottom is " + Str$(Rect(3)) + "," + Str$(Rect(4))
MsgBox(rct$, "", 0)
End Proc